package negocio;

import dao.DaoException;

public class CommandFacade implements Command {

	private String cmd;

	@Override
	public Object execute(Object obj) throws DaoException, NegocioException {
		Command command;
		
		if (cmd == "cadastroJogador") {
			command = new CadastroJogadorCommand();
			return command.execute(obj);
		}
		else if (cmd == "cadastroUsuario") {
			command = new CadastroUsuarioCommand();
			return command.execute(obj);
		}
		return null;
	}

	public void setCmd(String cmd) {
		this.cmd = cmd;
	}

	public String getCmd() {
		return cmd;
	}

}
